import request from '@/config/axios'

export interface ClueTransLogVO {
        id: number
        ruleId: number
        accountId: number
        clueTotal: number
        transTotal: number
        lastQueryTime: Date
        nextQueryTime: Date
}

// 查询规则执行记录列表
export const getClueTransLogPage = async (params) => {
    return await request.get({url: `/crm/clue-trans-log/page`, params})
}

// 查询规则执行记录详情
export const getClueTransLog = async (id: number) => {
    return await request.get({url: `/crm/clue-trans-log/get?id=` + id})
}

// 新增规则执行记录
export const createClueTransLog = async (data: ClueTransLogVO) => {
    return await request.post({url: `/crm/clue-trans-log/create`, data})
}

// 修改规则执行记录
export const updateClueTransLog = async (data: ClueTransLogVO) => {
    return await request.put({url: `/crm/clue-trans-log/update`, data})
}

// 删除规则执行记录
export const deleteClueTransLog = async (id: number) => {
    return await request.delete({url: `/crm/clue-trans-log/delete?id=` + id})
}

// 导出规则执行记录 Excel
export const exportClueTransLog = async (params) => {
    return await request.download({url: `/crm/clue-trans-log/export-excel`, params})
}